package com.nwpu.server.learning.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nwpu.server.common.response.PageUtils;
import com.nwpu.server.common.response.Query;
import com.nwpu.server.learning.dao.PretrainDao;
import com.nwpu.server.learning.entity.PretrainEntity;
import com.nwpu.server.learning.service.PretrainService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("pretrainService")
public class PretrainServiceImpl extends ServiceImpl<PretrainDao, PretrainEntity> implements PretrainService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<PretrainEntity> page = this.page(
                new Query<PretrainEntity>().getPage(params),
                new QueryWrapper<PretrainEntity>()
        );

        return new PageUtils(page);
    }

}